package sound;

public class Test {
	public static void main(String[] args){
		Simulator simulator=new Simulator();
		simulator.playSound(new Dog());//匿名对象
		simulator.playSound(new Cat());
	}
}
